import VueRouter from "vue-router";

const routes = [
    {
        path : "/",
        name : "login",
        component:()=>import('../components/Login')
    },
    {
        path : "/index",
        name : "index",
        component:()=>import('../components/index'),
        children:[
            {
                path : "/home",
                name : "home",
                meta:{
                  title : "首页"
                },
                component:()=>import('../components/home'),
            },
            {
                path : "/User",
                name : "user",
                meta:{
                    title : "用户管理"
                },
                component:()=>import('../components/user/user'),
            },
            {
                path : "/Repair",
                name : "repair",
                meta:{
                    title : "维修订单"
                },
                component:()=>import('../components/repair/repair'),
            },
            {
                path : "/Activity",
                name : "activity",
                meta:{
                    title : "活动"
                },
                component:()=>import('../components/activity/activity'),
            },
            {
                path : "/Activity_add",
                name : "Activity_add",
                meta:{
                    title : "活动"
                },
                component:()=>import('../components/activity/Activity_add'),
            },
            {
                path : "/Image",
                name : "image",
                meta:{
                    title : "活动"
                },
                component:()=>import('../components/image/image'),
            },
            {
                path : "/Image_add",
                name : "image_add",
                meta:{
                    title : "活动"
                },
                component:()=>import('../components/image/image_add'),
            },
        ]
    },
]

const router = new VueRouter({
    mode:'history',
    routes
})

export default router;